package cn.roadtrip.mtravelbusinessmodule.mvc.wrapper;

import cn.roadtrip.mtravelbusinessmodule.bs.basic.BasicBusinessImpl;
import cn.roadtrip.mtravelbusinessmodule.bs.comment.CommentImpl;
import cn.roadtrip.mtravelbusinessmodule.bs.page.TravelPageWrapper;
import cn.roadtrip.mtravelbusinessmodule.bs.shopproduct.UserTicketImpl;
import cn.roadtrip.mtravelbusinessmodule.bs.travelline.TravelLineImpl;
import cn.roadtrip.mtravelbusinessmodule.bs.tuorgroup.TourTravelImpl;
import cn.roadtrip.utilmodule.util.DataBean;
import cn.roadtrip.utilmodule.util.ValidControllerAnn;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/page")
public class TravelPageWrapperController {
    @Autowired
    private TravelPageWrapper travelPageWrapper;

    @Autowired
    private BasicBusinessImpl basicBusinessImpl;


    /**
     * 级联查询省市列表
     *
     * @param model
     * @return
     */
    @PostMapping("/getCityList")
    @ValidControllerAnn
    public DataBean getCityList(@RequestBody TravelPageWrapper.Model_getCityList model) {
        return travelPageWrapper.getCityList(model);
    }

    /**
     * 查询所有城市列表
     *
     * @return
     */
    @PostMapping("/getAllCityList")
    @ValidControllerAnn
    public DataBean getAllCityList() {
        return travelPageWrapper.getAllCityList();
    }

    /**
     * 查询城市景点
     *
     * @param model
     * @return
     */
    @PostMapping("/getCityScenicList")
    @ValidControllerAnn
    public DataBean getCityScenicList(@RequestBody TravelPageWrapper.Model_getCityScenicList model) {
        return travelPageWrapper.getCityScenicList(model);
    }

    /**
     * 查询目的地城市中的预设路线
     *
     * @param model
     * @return
     */
    @PostMapping("/getPreTravelListByCity")
    @ValidControllerAnn
    public DataBean getPreTravelListByCity(@RequestBody TravelPageWrapper.Model_getPreTravelListByCity model) {
        return travelPageWrapper.getPreTravelListByCity(model);
    }

    /**
     * 查询目的景点相关的预设路线
     *
     * @param model
     * @return
     */
    @PostMapping("/getPreTravelListBySenic")
    @ValidControllerAnn
    public DataBean getPreTravelListBySenic(@RequestBody TravelPageWrapper.Model_getPreTravelListBySenic model) {
        return travelPageWrapper.getPreTravelListBySenic(model);
    }


    /**
     * 根据关键词检索出景点
     *
     * @param model
     * @return
     */
    @PostMapping("/getCityScenicListByKey")
    @ValidControllerAnn
    public DataBean getCityScenicListByKey(@RequestBody TravelPageWrapper.Model_getCityScenicListByKey model) {
        return travelPageWrapper.getCityScenicListByKey(model);
    }


    /**
     * 查询旅游团-大小团
     *
     * @param model
     * @return
     */
    @PostMapping("/getTravelGroupList")
    @ValidControllerAnn
    public DataBean getTravelGroupList(@RequestBody TravelPageWrapper.Model_getTravelGroupList model) {
        return travelPageWrapper.getTravelGroupList(model);
    }

    /**
     * 首页获取推荐团列表
     *
     * @param model
     * @return
     */
    @RequestMapping("/getHomePageTravelGroupListByKey")
    @ValidControllerAnn
    public DataBean getHomePageTravelGroupListByKey(@RequestBody TravelLineImpl.Model_getHomePageTravelGroupListByKey model) {
        return travelPageWrapper.getHomePageTravelGroupListByKey(model);
    }

    /**
     * 查询出旅游路线详情
     *
     * @param model
     * @return
     */
    @RequestMapping("/getPreTravelLineDetail")
    @ValidControllerAnn
    public DataBean getPreTravelLineDetail(@RequestBody TravelLineImpl.Model_getTravelLineDetail model) {
        return travelPageWrapper.getPreTravelLineDetail(model);
    }

    /**
     * 查询小团详情
     *
     * @param model
     * @return
     */
    @RequestMapping("/getMainTravelLineRecordById")
    @ValidControllerAnn
    public DataBean getMainTravelLineRecordById(@RequestBody TourTravelImpl.Model_getMainTravelLineRecordById model) {
        return travelPageWrapper.getMainTravelLineRecordById(model);
    }

    /**
     * 查询大团详情
     *
     * @param model
     * @return
     */
    @RequestMapping("/getTravelListGroupById")
    @ValidControllerAnn
    public DataBean getTravelListGroupById(@RequestBody TravelLineImpl.Model_getTravelListGroupById model) {
        return travelPageWrapper.getTravelListGroupById(model);
    }


    /**
     * 创建评论
     *
     * @param model
     * @return
     */
    @RequestMapping("/createComment")
    @ValidControllerAnn
    public DataBean createComment(@RequestBody CommentImpl.Model_createComment model) {
        return travelPageWrapper.createComment(model);
    }

    /**
     * 查询评论--评论类型
     *
     * @param model
     * @return
     */
    @RequestMapping("/getCommentListByType")
    @ValidControllerAnn
    public DataBean getCommentListByType(@RequestBody CommentImpl.Model_getCommentListByType model) {
        return travelPageWrapper.getCommentListByType(model);
    }

    /**
     * 点赞
     *
     * @param model
     * @return
     */
    @RequestMapping("/doZan")
    @ValidControllerAnn
    public DataBean doZan(@RequestBody CommentImpl.Model_doZan model) {
        return travelPageWrapper.doZan(model);
    }


    /**
     * 查询拼搭子类型
     *
     * @return
     */
    @RequestMapping("/getTravelGroupTypeList")
    @ValidControllerAnn
    public DataBean getTravelGroupTypeList() {
        return travelPageWrapper.getTravelGroupTypeList();
    }


    /**
     * 查询活动类型
     *
     * @return
     */
    @RequestMapping("/getActiveTypeList")
    @ValidControllerAnn
    public DataBean getActiveTypeList() {
        return travelPageWrapper.getActiveTypeList();
    }


    /**
     * 获取开通得城市列表
     *
     * @return
     */
    @RequestMapping("/getOpenCitylist")
    @ValidControllerAnn
    public DataBean getOpenCitylist(@RequestBody BasicBusinessImpl.Model_getOpenCitylist model) {
        return basicBusinessImpl.getOpenCitylist(model);
    }


    /**
     * 查询所有开通得学校，由前端过滤筛选
     *
     * @return
     */
    @RequestMapping("/getSchoolList")
    @ValidControllerAnn
    public DataBean getSchoolList() {
        return basicBusinessImpl.getSchoolList();
    }


    /**
     * 获取用户券
     *
     * @return
     */
    @RequestMapping("/getUserTicketListBy")
    @ValidControllerAnn
    public DataBean getUserTicketListBy(@RequestBody UserTicketImpl.Model_getUserTicketListBy model) {
        return travelPageWrapper.getUserTicketListBy(model);
    }


    /**
     * 查询出前端静态内容文本
     *
     * @return
     */
    @RequestMapping("/getFrontStaticPageContent")
    @ValidControllerAnn
    public DataBean getFrontStaticPageContent() {
        return basicBusinessImpl.getFrontStaticPageContent();
    }

    /**
     * 查询出前端静态内容文本
     *
     * @return
     */
    @RequestMapping("/getFrontStaticPageContent_json")
    @ValidControllerAnn
    public java.util.List<BasicBusinessImpl.VPO_getFrontStaticPageContent> getFrontStaticPageContent_json() {
        return (java.util.List<BasicBusinessImpl.VPO_getFrontStaticPageContent>) basicBusinessImpl.getFrontStaticPageContent().getResult();
    }

    /**
     * 查询保险类型列表
     *
     * @return
     */
    @RequestMapping("/getInsuranceTypeList")
    @ValidControllerAnn
    public DataBean getInsuranceTypeList(@RequestBody BasicBusinessImpl.Model_getInsuranceTypeList model) {
        return basicBusinessImpl.getInsuranceTypeList(model);
    }

    /**
     * 查询保险类型列表
     *
     * @return
     */
    @RequestMapping("/getTravelPickUpByCity")
    @ValidControllerAnn
    public DataBean getTravelPickUpByCity(@RequestBody TravelPageWrapper.Model_getTravelPickUpByCity model) {
        return travelPageWrapper.getTravelPickUpByCity(model);
    }


    /**
     * 获取接送上车围栏
     *
     * @return
     */
    @RequestMapping("/getPickupZoneArea")
    @ValidControllerAnn
    public DataBean getPickupZoneArea(@RequestBody BasicBusinessImpl.Model_getPickupZoneArea model) {
        return basicBusinessImpl.getPickupZoneArea(model);
    }

    /**
     * 获取所有城市围栏
     *
     * @return
     */
    @RequestMapping("/getAllCityZoneArea")
    @ValidControllerAnn
    public DataBean getAllCityZoneArea() {
        return basicBusinessImpl.getAllCityZoneArea();
    }
}
